<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpChildFrames();
}

var origins = location.ancestorOrigins;
document.write('ancestorOrigins.length = ' + origins.length);
</script>
<iframe srcdoc="
  <script>
  var origins = location.ancestorOrigins;
  document.write('ancestorOrigins.length = ' + origins.length + '<br>');
  document.write('ancestorOrigins[0] = ' + origins[0]);
  </script>
"></iframe>
